﻿using BCEntity.TMS.SpecificServiceType;
using BCEntity.TMS.SpecificServiceTypeOverWrite;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace BCData.TMS.SpecificServiceTypeOverWrite
{
    public interface ISpecificServiceTypeOverWriteData
    {
        /// <summary>
        /// 删除特殊服务类型重写记录
        /// </summary>
        /// <param name="specificServiceTypeOverWriteId"></param>
        /// <returns></returns>
        Task<bool> DeleteAsync(int specificServiceTypeOverWriteId);

        /// <summary>
        /// 删除特殊服务类型重写记录
        /// </summary>
        /// <param name="specificServiceTypeId"></param>
        /// <returns></returns>
        Task<bool> DeleteByFatherIdAsync(int specificServiceTypeId);

        /// <summary>
        /// 获取特殊服务类型重写记录
        /// </summary>
        /// <param name="specificServiceTypeOverWriteId"></param>
        /// <returns></returns>
        Task<SpecificServiceTypeOverWriteEntity> GetEntityAsync(int specificServiceTypeOverWriteId);

        /// <summary>
        /// 查询运输特殊服务费配置重写记录条数
        /// </summary>
        /// <param name="provinceCode"></param>
        /// <param name="cityCode"></param>
        /// <param name="countyCode"></param>
        /// <param name="agentRecordId"></param>
        /// <param name="specificServiceTypeId"></param>
        /// <returns></returns>
        Task<int> GetCountAsync(string provinceCode, string cityCode, string countyCode, long agentRecordId, int specificServiceTypeId);

        /// <summary>
        /// 查询特殊服务类型重写记录 分页
        /// </summary>
        /// <param name="ProvinceCode"></param>
        /// <param name="CityCode"></param>
        /// <param name="CountyCode"></param>
        /// <param name="agentRecordId"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<(IEnumerable<SpecificServiceTypeViewEntity>, int)> GetListAsync(string ProvinceCode, string CityCode, string CountyCode,long agentRecordId, int pageIndex, int pageSize);

        /// <summary>
        /// 添加新特殊服务类型重写纪录
        /// </summary>
        /// <param name="specificServiceTypeOverWriteEntity"></param>
        /// <returns></returns>
        Task<SpecificServiceTypeOverWriteEntity> InsertAsync(SpecificServiceTypeOverWriteEntity entity);

        /// <summary>
        /// 修改特殊服务类型重写记录
        /// </summary>
        /// <param name="specificServiceTypeOverWriteEntity"></param>
        /// <returns></returns>
        Task<SpecificServiceTypeOverWriteEntity> UpdateAsync(SpecificServiceTypeOverWriteEntity entity);
    }
}